<div class="body_center">
	<h1 class="title"><?= $sitetext['our_works']['_value'] ?></h1>
	<div class="chooseDate">
		<? if (empty($page)) $page = 1 ?>
		<? if (!strpos($uri, 'Y-')): ?>
			<span class="marked" style="margin-right: 40px; font-weight: normal">
				<?= $sitetext['all']['_value'] ?>
			</span>
		<? else: ?>
			<span style="margin-right: 40px">
				<a href="<?= URL::site($lang.'/works') ?>"><?= $sitetext['all']['_value'] ?></a>
			</span>
		<? endif ?>
		<? foreach ($dates as $key => $item): ?>
			<? if (strpos($uri, 'Y-'.$item->creation_date)): ?>
				<span class="marked" style="margin-right: 40px; font-weight: normal">
					<?= $item->creation_date ?>
				</span>
			<? else: ?>
				<span style="margin-right: 40px">
					<a href="<?= URL::site($lang.'/works/Y-'.$item->creation_date) ?>"><?= $item->creation_date ?></a>
				</span>
			<? endif ?>
		<? endforeach ?>
	</div>
	<div class="dotted_line" style="border: none"></div>
	<? foreach ($works as $key => $item): ?>
		<div class="work_cont" <?= (($key + 1) % 3 == 0) ? 'style="margin-right: 0"' : '' ?> itemscope="" itemtype="http://schema.org/CreativeWork">
			<a itemprop="url" href="<?= URL::site($lang.'/works/'.$item->id) ?>" style="border: none">
				<img itemprop="image" class="lazy" src="<?= URL::site('static/css/images/grey.gif') ?>" data-original="<?= URL::site('static/uploads/works/'.$item->image) ?>" alt="<?= $item->title ?>" width="290px" height="290px">
			</a>
			<br /><br />
			<a itemprop="url" href="<?= URL::site($lang.'/works/'.$item->id) ?>">
				<span itemprop="name"><?= $item->title ?></span>
			</a>
			<p class="data" itemprop="dateCreated"><?= Model::factory('Date')->parseDate($item->creation_date, $lang) ?></p>
		</div>
	<? endforeach ?>
	<div class="clear"></div>
	<div style="margin-top: 20x">
		<?= $pagination ?>
	</div>
	<?= View::factory('pieces/social') ?>
</div>